<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Component 父子组件关系</title>
  <script src="../assets/js/vue.js"></script>
</head>

<body>
  <h1>Component-3</h1>
  <hr>
  <div id="app">
    <panda></panda>
  </div>
  <script type="text/javascript">
    var city = {
      template: `<div style="color:green;">city</div>`
    }
    var pandaComponent = {
      template: `
      <div>
      <p>Panda from China!</p>
      <city></city>
      </div>
      `,
      components: {
        "city": city
      }
    }

    var app = new Vue({
      el: '#app',
      components: {
        "panda": pandaComponent,
      }
    })
  </script>
</body>

</html>